<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>百顺通云-升级确认订单</title>
	<link rel="shortcut icon" href="/images/user/favicon.png" type="image/x-icon">
	<!-- 全局CSS  -->
	<link type="text/css" rel="stylesheet" href="/css/user/global.css" />
	<link type="text/css" rel="stylesheet" href="/css/dialog.min.css" />
	<!-- 局部CSS  -->
	<link type="text/css" rel="stylesheet" href="/css/user/buy/uporder.css" rel="stylesheet"  />
	<!-- 全局js框架 -->
	<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src = "/js/dialog.min.js"></script>
	<script type="text/javascript" src = "/js/bstdialog.min.js"></script>
	<script type="text/javascript" src="/js/dropbox.js"></script>
	<!-- 局部js  -->
	<script type="text/javascript" src="/js/ajaxDataFormat.js"></script>
	<script type="text/javascript" src="/js/mineDateCalculate.js"></script>
	<script type="text/javascript" src="/js/feeCalculate.js"></script>
	<script type="text/javascript" src="/js/user/users/myservice/upgrade.js"></script>
</head>
<body>
<input type="hidden" id="orderId" value="${orderVo.orderId}">
<input type="hidden" id="useLife" value="${orderVo.useLife}">
<input type="hidden" id="goodsPrice" value="${goods.goodsPrice}">
<input type="hidden" id="baseUser" value="${orderVo.userNum}">
<input type="hidden" id="overTime" value='<fmt:formatDate value="${orderVo.overTime}" pattern="yyyy-MM-dd HH:mm"/>'/>
<input type="hidden" id="freeOverTime" value='<fmt:formatDate value="${freeOverTime}" pattern="yyyy-MM-dd HH:mm"/>'/>
<input type="hidden" id="feeFormula" value="${goods.feeFormula}"/>
<input type="hidden" id="feeBasenum" value="${goods.feeBasenum}"/>
<div class="Wrapper">
	<!--购物车头部-->
	<jsp:include page="../../common/buy/buy_header.jsp"></jsp:include>
	<!--购物车头部-->
	
    <!--会员中心中间部分-->
    <div class="uc_bd">
    	<div class="uc_layer">
        	<!--升级步骤开始-->
        	<div class="across_box">
	        	<div class="y-span3 box_size cle">
					<h1 class="uc-title" title="确认订单">确认订单</h1>
				</div>
			</div>
			
            <div class="process_bar box_size">
            	<!-- 三挑一 -->
            	<!-- 确认升级 -->
                <div class="uc-process">
					<span class="unit w325 current">确认升级订单</span>
					<span class="arrow-current">
						<span class="next"></span>
						<span class="prev"></span>
					</span>
					<span class="unit w325 ">支付</span>
					<span class="arrow">
						<span class="next"></span>
						<span class="prev"></span>
					</span>
					<span class="unit w326">支付成功</span>
				</div>
			</div>
            <!--核对产品订单开始-->
			<div class="box_size upgrade_box">
            	<h2 style="color:#555">当前产品信息</h2>
            	
                <div class="order-info mt10">
					<div class="info-name">
						<p><label>使用单位：</label><span>${orderVo.belongCompanyName}</span></p>
						<p><label>公司域名：</label><span>${orderVo.companyDomainName}</span></p>
						<p><label>管理员帐号：</label><span>${orderVo.userEmail}</span></p>
					</div>
					<div class="info-row">
						<table>
							<tbody>
							<tr class="product_title">
								<td><label>产品名称</label></td>
								<td><label>年限</label></td>
								<td><label>用户数</label></td>
								<td><label>单价（元）</label></td>
								<td><label>到期时间</label></td>
							</tr>
							<tr>
								<td><label>${orderVo.goodsName}<p>（${orderVo.proIds}）</p></label></td>
<%-- 								<td><label>${order.mealName}<c:if test="${order.productName != null}"><p>（${order.productName}）</p></c:if></label></td> --%>
								<td><label>${orderVo.useLife}
									<%-- <c:choose>
			                        	<c:when test="${order.useLife == '-1'}">永久</c:when>
			                        	<c:when test="${order.useLife == '0'}">20天</c:when>
			                        	<c:otherwise>${order.useLife}</c:otherwise>
		                        	</c:choose> --%>
		                        	</label>
		                        </td>
								<td><label>${orderVo.userNum}</label></td>
								<td><label><fmt:formatNumber value="${goods.goodsPrice}" pattern="#0.00" /></label></td>
								<td><label class="time-color"><fmt:formatDate value="${orderVo.overTime}" pattern="yyyy-MM-dd HH:mm"/></label></td>
							</tr>
						</tbody>
						</table>
					</div>
					<div class="time-row">
						<label>当前${orderVo.goodsName}的用户数：</label><span class="time-color">${orderVo.userNum}</span>
						<c:if test="${flag == 1}"><label style="margin-left:50px;">能升级到的最大用户数为：</label><span class="time-color">${order.userNum}</span></c:if>
					</div>
				</div>
				<div class="uppeople">
					<div class="range_title">用户数量：</div>
					<select class="select_option dropbox" id="accountNum">
	                	<c:choose>
	                		<c:when test="${flag == 0}">
	                			<%-- <c:forEach begin="${orderVo.userNum + goods.usersMin}" end="${goods.usersMax}" step="${goods.usersMin}" varStatus="status"> --%>
	                			<c:forEach begin="${orderVo.userNum + 10}" end="${goods.usersMax}" step="10" varStatus="status">
		                          	<option value="${status.index}">${status.index}</option>
		                        </c:forEach>
	                		</c:when>
	                		<c:otherwise>
			                	<c:forEach begin="${orderVo.userNum + 10}" end="${order.userNum}" step="10" varStatus="status">
		                          	<option value="${status.index}">${status.index}</option>
		                        </c:forEach>
	                		</c:otherwise>
	                	</c:choose>
                    </select>
				</div>
            </div>
            <div class="box_size gotopay">
            	<span>
            		<span class="need2pay">应付款：<em>0.00</em></span><br/>
					<button type="button" class="btn-to-pay uc-button upgrade">去支付</button>
				</span>
			</div>
            <!--核对产品订单结束-->
      	</div>
    </div>
    <!--会员中心中间部分-->
    <!---------------------------------footer------------------------------------>
  	<jsp:include page="../../common/footer.jsp"/>
  	<!---------------------------------footer结束------------------------------------>
</div>
</body>
</html>
